#安装第三方库
import os # 引用os库
libs ={'pyyaml','pytest','selenium','pymongo','requests','pyautogui','xlrd','PyMySQL','pytest-repeat'
       ,'pytest-rerunfailures','pytest-dependency','allure-pytest','allure-python-commons'}
try:
    for lib in libs: #循环遍历字典（从第一个元素到最后一个元素）
        os.system("pip install "+lib)#将列表中的数据和pip install 指令结合然后传入cmd命令行中
    print("Successful") #返回安装信息
except:
    print("Failed Somehow")
